package com.zmj.sy.mom.srv.aps.feign;


import com.zmj.sy.mom.srv.aps.bean.dto.apsmes.DoWorksDto;
import com.zmj.sy.mom.srv.aps.bean.vo.aps.HexagonOrderListItemResVo;
import com.zmj.sy.mom.srv.aps.bean.vo.base.Result;
import com.zmj.sy.mom.srv.aps.bean.vo.consistency.ConsistencyCheckDataResVo;
import com.zmj.sy.mom.srv.aps.bean.vo.consistency.ConsistencyCheckReqVo;
import com.zmj.sy.mom.srv.aps.bean.vo.mesNest.MesReceiveNestPartReqVo;
import com.zmj.sy.mom.srv.aps.bean.vo.nest.NestPlatePushDto;
import com.zmj.sy.mom.srv.aps.bean.vo.nest.newNest.ReceiveNestPlateReqVo;
import com.zmj.sy.mom.srv.aps.bean.vo.part.PartPngUrlVo;
import com.zmj.sy.mom.srv.aps.bean.vo.plate.UpdateNxolpstatusVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;


@FeignClient(value = "mom-aps-mes")
public interface ApsMesFeign {
    /**
     * 从mbd获取尺寸
     */
    @PostMapping("/spx/api/doPicking")
    public Result doPicking(@RequestParam("steelNos") String steelNos);

    /**
     * 从 MES 数据库获取零件图纸
     */
    @GetMapping("/platePick/getPngUrl")
    PartPngUrlVo getPngUrl(@RequestParam("plmId") String plmId);

    /**
     * 从 MES 数据库获取零件图纸
     */
    @GetMapping("/plateCuttingController/doWorks")
    public Result<?> doWorks(@RequestBody DoWorksDto dto) ;

    @GetMapping("/order/select")
    List<HexagonOrderListItemResVo> orderList();

    @PostMapping("/platePick/fixNestInfo")
    Result fixNestInfo(@RequestBody NestPlatePushDto reqVo);

    @PostMapping("/platePick/fixNestPartInfo")
    Result fixNestPartInfo(@RequestBody NestPlatePushDto reqVo);

    @PostMapping("/platePick/fixNestPartInfo258")
    Result fixNestPartInfo258(@RequestBody NestPlatePushDto reqVo);

    @PostMapping("/platePick/nestPartInfoAgain")
    Result nestPartInfoAgain(@RequestBody String plateCode);

    @PostMapping("/plateCuttingController/updateNxolpstatus")
    Map<String,Object> updateNxolpstatus(@RequestBody UpdateNxolpstatusVo param);

    @PostMapping("/plateCuttingController/lockNxolpstatus")
    Map<String,Object> lockNxolpstatus(@RequestBody UpdateNxolpstatusVo param);

    @PostMapping("/platePick/getPlateNestInfo")
    List<MesReceiveNestPartReqVo> getPlateNestInfo(@RequestBody String plateCode);

    @PostMapping("/nest/part")
    List<ConsistencyCheckDataResVo> part(@RequestBody ConsistencyCheckReqVo reqVo);

    @GetMapping("/platePick/receiveNestInfo")
    ReceiveNestPlateReqVo receiveNestInfo(@RequestParam("plateCode") String plateCode);

    @GetMapping("/platePick/receiveNestInfoNestId")
    List<ReceiveNestPlateReqVo> receiveNestInfoNestId(@RequestParam("nestId") String nestId);

    @GetMapping("/platePick/checkNestPlate")
    ReceiveNestPlateReqVo checkNestPlate(@RequestParam("plateCode") String plateCode);

}